import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner i = new Scanner(System.in);
        int cost = i.nextInt();
        if(cost >= 100 && cost < 500){
            cost = (int)(cost * 9 / 10);
        }else if(cost >= 500 && cost < 2000){
            cost = (int)(cost *8/ 10);
        }else if(cost >= 2000 && cost < 5000){
            cost  = (int)(cost * 7 / 10);
        }else if(cost >= 5000){
            cost  = (int)(cost * 6 / 10);
        }


        System.out.println(cost);
    }
}
